<template>
  <div>
    <h1>我是didi</h1>
    {{ count }}
  </div>
</template>

<script>
export default {
  name: "Didi",
  data() {
    return {
      //一般我们再接收发布信息之前，都要书写一个初始值
      count: 0,
    };
   
  },
   mounted(){
      this.$bus.$on("count",(count)=>{
        this.count=count
      })
    }
  
};
</script>

<style>
</style>